#ifndef GAME_PRINTER_H_
#define GAME_PRINTER_H_

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <time.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/sem.h>
#include <signal.h>
#include <menu.h>
#include <stdlib.h>
#include <string.h>
#include <curses.h>
#include "robak.h"

#define SNAKE_TIMEOUT_INTERVAL 70000
#define CONSOLE_X_RES 78
#define CONSOLE_Y_RES 30
#define TIME_DELAY SNAKE_TIMEOUT_INTERVAL
#define SNAKE_SEGMENT_CHAR 254 /* 254,,235,177,178*/
#define STRING_GAME_OVER "#######   GAME OVER  ######"
#define STRING_PRESS_KEY "<< WCISNIJ GUZIK ABY KONTYNUOWAC >>"
#define STRING_WAITING_FOR_PLAYERS  "<< CZEKAM NA GRACZY  >>"
#define STRING_NOBODY_CONNECTED "<< NIKT SIE NIE POLACZYL - TRYB GRY POJEDYNCZEJ>>"
#define STRING_CONNECTING_WITH_SERVER  "<< LACZE SIE Z SERWEREM >>"
#define STRING_ERROR_CANT_CONNECT  "<< BLAD NIE MOGE SIE POLACZYC... >>"
#define STRING_SUCCESS_CONNECT  "<< POLACZONO >>"
#define STRING_YOU_LOST "<  !!!!!   PRZEGRALES RUNDE  !!!!!>"
#define STRING_YOU_WIN "< !!!!!!! WYGRALES RUNDE !!!!!!>"

#define MENU_NAME "Robaczek"
#define EXIT_NAME "WYJSCIE"
#define CONNECT_WITH_SERVER "Polacz z serwerem"
#define CREATE_SERVER "Zaloz serwer"
#define REAL_ENTER_CODE 10
#define NONE_PLAYERS_CONNECTED_SEC 2

void gp_print_current_state( AppData *data);
void gp_do_test_gaming( AppData *data);
void gp_read_keyboard_data(AppData* data);
void gp_inform_on_middle(AppData* data, char * message);
void gp_inform_game_over(AppData * data);
void gp_inform_lose_win(AppData * data, bool winner, int server_wins, int players_win,
                        		  char * player_name);
#endif /*GAME_PRINTER_H_*/
